import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;

class TimeFlow {
    private ArrayList<Crop> crops;
    private Timer timer;

    public TimeFlow() {
        this.crops = new ArrayList<>();
        this.timer = new Timer();
    }

    public void addCrop(Crop crop) {
        crops.add(crop);
    }

    public void start() {
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                for (Crop crop : crops) {
                    crop.grow();
                }
            }
        }, 0, 1000);
    }

    public void stop() {
        timer.cancel();
    }
}